 # Triggers are in Province scope. The From Scope contains the settlement holder (character)
 # start trigger is in title scope.
 
 #<tag> = {
 #	desc = description used in the tooltip of the building
 #	trigger = used for tech requirement of the building, set to 0 if no requirement so it can be build automatically on new games
 #	build_cost = cost to build the building
 #	build_time = time to build, in days
 #	
 #	ai_creation_factor = weight that the AI uses to determine what building to build
 #	extra_tech_building_start = when starting a new game this building will be pre-built if the province has higher tech than the requirement + this + random 0-1
 #}
 
 # Castle
castle = {
	# Steppe Barracks, gives less heavy infantry, no pikemen, but some horsies
	ca_steppe_barracks_1 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_barracks_1
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		heavy_infantry = 25
		light_cavalry = 20
		ai_creation_factor = 105
		
		extra_tech_building_start = 1.0
	}
	ca_steppe_barracks_2 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_barracks_2
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		prerequisites = { ca_wall_1 }
		upgrades_from = ca_steppe_barracks_1
		build_cost = 120
		build_time = 547
		heavy_infantry = 35
		light_cavalry = 20
		ai_creation_factor = 104
		
		extra_tech_building_start = 1.8
	}
	ca_steppe_barracks_3 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_barracks_3
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		prerequisites = { ca_wall_2 }
		upgrades_from = ca_steppe_barracks_2
		build_cost = 200
		build_time = 730
		heavy_infantry = 40
		light_cavalry = 25
		ai_creation_factor = 103

		extra_tech_building_start = 3.0
	}
	ca_steppe_barracks_4 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_barracks_4
		trigger = { TECH_CASTLE_CONSTRUCTION = 1 }
		upgrades_from = ca_steppe_barracks_3
		build_cost = 300
		build_time = 1095
		heavy_infantry = 45
		light_cavalry = 30
		ai_creation_factor = 102

		extra_tech_building_start = 3.0
	}
	ca_steppe_barracks_5 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_barracks_5
		trigger = { TECH_CASTLE_CONSTRUCTION = 3 }
		upgrades_from = ca_steppe_barracks_4
		build_cost = 400
		build_time = 2190
		heavy_infantry = 55
		light_cavalry = 30
		ai_creation_factor = 101

		extra_tech_building_start = 2.0
	}
	ca_steppe_barracks_6 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_barracks_6
		trigger = { TECH_CASTLE_CONSTRUCTION = 5 }
		upgrades_from = ca_steppe_barracks_5
		build_cost = 500
		build_time = 2190
		heavy_infantry = 60
		light_cavalry = 35
		ai_creation_factor = 100

		extra_tech_building_start = 0.2
	}
	
	#Steppe Stable, gives light cavalry, horse archers and some heavy cavalry
	ca_steppe_stable_1 = {
		desc = ca_steppe_stable_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_stable_1
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		light_cavalry = 25
		horse_archers = 10
		ai_creation_factor = 89
		
		extra_tech_building_start = 0.4
	}
	ca_steppe_stable_2 = {
		desc = ca_steppe_stable_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_stable_2
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		prerequisites = { ca_wall_1 }
		upgrades_from = ca_steppe_stable_1
		build_cost = 120
		build_time = 547
		light_cavalry = 25
		horse_archers = 20
		ai_creation_factor = 88

		extra_tech_building_start = 0.8
	}
	ca_steppe_stable_3 = {
		desc = ca_steppe_stable_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_stable_3
		trigger = { TECH_CASTLE_CONSTRUCTION = 2 }
		prerequisites = { ca_wall_2 }
		upgrades_from = ca_steppe_stable_2
		build_cost = 200
		build_time = 730
		light_cavalry = 35
		horse_archers = 20
		ai_creation_factor = 87

		extra_tech_building_start = 0.2
	}
	ca_steppe_stable_4 = {
		desc = ca_steppe_stable_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_stable_4
		trigger = { TECH_CASTLE_CONSTRUCTION = 4 }
		upgrades_from = ca_steppe_stable_3
		build_cost = 300
		build_time = 1095
		light_cavalry = 35
		horse_archers = 20
		knights = 5
		ai_creation_factor = 86

		extra_tech_building_start = 0.2
	}
	ca_steppe_stable_5 = {
		desc = ca_steppe_stable_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_stable_5
		trigger = { TECH_CASTLE_CONSTRUCTION = 6 }
		upgrades_from = ca_steppe_stable_4
		build_cost = 400
		build_time = 2190
		light_cavalry = 35
		horse_archers = 20
		knights = 10
		ai_creation_factor = 85

		extra_tech_building_start = 0.2
	}
	ca_steppe_stable_6 = {
		desc = ca_steppe_stable_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = ca_stable_6
		trigger = { TECH_CASTLE_CONSTRUCTION = 8 }
		upgrades_from = ca_steppe_stable_5
		build_cost = 500
		build_time = 2190
		light_cavalry = 35
		horse_archers = 20
		knights = 20
		ai_creation_factor = 85

		extra_tech_building_start = 0.2
	}
}
